{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Statistical analysis for \"Limits on Regret as a Tool for Incentive Design\"\n",
    "\n",
    "#### Online (Prolific) data\n",
    "\n",
    "#### Written for STATA 18"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "sca drop _all\n",
    "set more off\n",
    "clear all\n",
    "\n",
    "set scheme lean2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "* Define folder locations if working with local computer\n",
    "\n",
    "local folderloc=\"/Users/`c(username)'/Dropbox/isw_dynregret/paper/JPEMicro/publication/\"\n",
    "qui cd `folderloc'\n",
    "local data = \"`folderloc'/data/online/\"\n",
    "local stata_data = \"`folderloc'/stata/data/\"\n",
    "local stata_i = \"`folderloc'/stata/i/\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## (1) Open dataset with ONLINE data (includes pilot data)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "use \"`stata_data'/202410_data_online.dta\", clear"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "id            simpractic~1  bcounter      time_pract~e  aux_match\n",
      "round         q449_1        accearn       click_prac~e  relative_v\n",
      "start_date    time_quiz1    accearnst     click_quiz    regret\n",
      "end_date      quiz_1_1      totearnst     time_value    sequential\n",
      "progress      quiz_1_2      offer         time_results  minutes\n",
      "seconds       time_quiz2    tick1_        find_hex      med_quiz_c~k\n",
      "finished      quiz_2_1      tick2_        int_id        above_med_~k\n",
      "record_date   quiz_2_2      tick3_        value         median_id\n",
      "id_qualtrics  age           win1_         entry         above_med_id\n",
      "screen_hon~u  gender        win2_         n_match       med_time_i~s\n",
      "screen_fruit  seqrandsto~e  win3_         payoff        above_med_~s\n",
      "screen_human  ticket1       cond          total_payoff  med_time_p~e\n",
      "screen_par    ticket2       time_bot      bonus_paym~t  above_med_~e\n",
      "id_prolific   ticket3       time_instr~s  pilot         time_value~d\n",
      "seqpractic~1  screen        time_video    prior_prol~c  average_va~e\n"
     ]
    }
   ],
   "source": [
    "ds"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## (2) Online Appendix TABLE D.4"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 2.1 Regret premium in the simultaneous treatments"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "NOTE: does not include pilot data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "            |        Summary of relative_v\n",
      "       cond |        Mean   Std. dev.       Freq.\n",
      "------------+------------------------------------\n",
      "    std-sim |   .66479225   .40533522          77\n",
      "    reg-sim |   .64065423    .3696063          79\n",
      "------------+------------------------------------\n",
      "      Total |   .65256851   .38658765         156\n"
     ]
    }
   ],
   "source": [
    "tab cond if ( cond==3 | cond==4 ) & round==1 & pilot!=1, sum(relative_v)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "(17,760 observations deleted)\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "      Source |       SS           df       MS      Number of obs   =       156\n",
      "-------------+----------------------------------   F(1, 154)       =      0.15\n",
      "       Model |  .022719385         1  .022719385   Prob > F        =    0.6979\n",
      "    Residual |  23.1420324       154  .150272938   R-squared       =    0.0010\n",
      "-------------+----------------------------------   Adj R-squared   =   -0.0055\n",
      "       Total |  23.1647518       155  .149450012   Root MSE        =    .38765\n",
      "\n",
      "------------------------------------------------------------------------------\n",
      "  relative_v | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "      regret |   -.024138   .0620789    -0.39   0.698    -.1467741     .098498\n",
      "       _cons |   .6647923   .0441769    15.05   0.000     .5775214    .7520632\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      " ( 1)  regret + _cons = 0\n",
      "\n",
      "------------------------------------------------------------------------------\n",
      "  relative_v | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "         (1) |   .6406542   .0436141    14.69   0.000     .5544951    .7268134\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      "      Source |       SS           df       MS      Number of obs   =       156\n",
      "-------------+----------------------------------   F(2, 153)       =      0.08\n",
      "       Model |  .023286078         2  .011643039   Prob > F        =    0.9259\n",
      "    Residual |  23.1414658       153   .15125141   R-squared       =    0.0010\n",
      "-------------+----------------------------------   Adj R-squared   =   -0.0121\n",
      "       Total |  23.1647518       155  .149450012   Root MSE        =    .38891\n",
      "\n",
      "------------------------------------------------------------------------------\n",
      "  relative_v | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "      regret |  -.0244316    .062465    -0.39   0.696    -.1478368    .0989737\n",
      "      female |  -.0038235    .062465    -0.06   0.951    -.1272287    .1195817\n",
      "       _cons |   .6668281   .0554127    12.03   0.000     .5573553     .776301\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      "Linear regression                               Number of obs     =      3,120\n",
      "                                                F(1, 155)         =       0.15\n",
      "                                                Prob > F          =     0.6974\n",
      "                                                R-squared         =     0.0010\n",
      "                                                Root MSE          =     .38528\n",
      "\n",
      "                                   (Std. err. adjusted for 156 clusters in id)\n",
      "------------------------------------------------------------------------------\n",
      "             |               Robust\n",
      "  relative_v | Coefficient  std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "      regret |   -.024138   .0619611    -0.39   0.697    -.1465352    .0982592\n",
      "       _cons |   .6647923   .0460465    14.44   0.000     .5738326    .7557519\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      " ( 1)  regret + _cons = 0\n",
      "\n",
      "------------------------------------------------------------------------------\n",
      "  relative_v | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "         (1) |   .6406542   .0414597    15.45   0.000     .5587554    .7225531\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      "Linear regression                               Number of obs     =      3,120\n",
      "                                                F(2, 155)         =       0.08\n",
      "                                                Prob > F          =     0.9265\n",
      "                                                R-squared         =     0.0010\n",
      "                                                Root MSE          =     .38534\n",
      "\n",
      "                                   (Std. err. adjusted for 156 clusters in id)\n",
      "------------------------------------------------------------------------------\n",
      "             |               Robust\n",
      "  relative_v | Coefficient  std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "      regret |  -.0244316    .062496    -0.39   0.696    -.1478854    .0990223\n",
      "      female |  -.0038235   .0623834    -0.06   0.951    -.1270549    .1194079\n",
      "       _cons |   .6668281   .0590892    11.29   0.000     .5501041    .7835521\n",
      "------------------------------------------------------------------------------\n",
      "\n"
     ]
    }
   ],
   "source": [
    "preserve\n",
    "\n",
    "* Only simultaneous; and only data from the main treatments\n",
    "keep if ~sequential\n",
    "qui gen inreg = ( cond<=4 & pilot!=1 )\n",
    "qui gen female = ( gender==\"Female\" )\n",
    "\n",
    "* First-round only\n",
    "reg relative_v regret if round==1 & inreg\n",
    "lincom _cons + _b[regret]\n",
    "\n",
    "reg relative_v regret female if round==1 & inreg\n",
    "\n",
    "* All rounds with clustering\n",
    "\n",
    "reg relative_v regret if inreg, cluster(id)\n",
    "lincom _cons + _b[regret]\n",
    "\n",
    "reg relative_v regret female if inreg, cluster(id)\n",
    "\n",
    "restore"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 2.2  Sequentiality premium for standard lotteries"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "NOTE: does not include pilot data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "            |        Summary of relative_v\n",
      "       cond |        Mean   Std. dev.       Freq.\n",
      "------------+------------------------------------\n",
      "    std-seq |   .66410218   .37252825         134\n",
      "    std-sim |   .66479225   .40533522          77\n",
      "------------+------------------------------------\n",
      "      Total |   .66435401   .38386473         211\n"
     ]
    }
   ],
   "source": [
    "tab cond if ( cond==1 | cond==3 ) & round==1 & pilot!=1, sum(relative_v)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "(12,440 observations deleted)\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "      Source |       SS           df       MS      Number of obs   =       211\n",
      "-------------+----------------------------------   F(1, 209)       =      0.00\n",
      "       Model |  .000023287         1  .000023287   Prob > F        =    0.9900\n",
      "    Residual |  30.9439247       209  .148057056   R-squared       =    0.0000\n",
      "-------------+----------------------------------   Adj R-squared   =   -0.0048\n",
      "       Total |   30.943948       210  .147352133   Root MSE        =    .38478\n",
      "\n",
      "------------------------------------------------------------------------------\n",
      "  relative_v | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "  sequential |  -.0006901   .0550247    -0.01   0.990    -.1091647    .1077846\n",
      "       _cons |   .6647923     .04385    15.16   0.000     .5783473    .7512372\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      " ( 1)  sequential + _cons = 0\n",
      "\n",
      "------------------------------------------------------------------------------\n",
      "  relative_v | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "         (1) |   .6641022   .0332401    19.98   0.000     .5985734     .729631\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      "      Source |       SS           df       MS      Number of obs   =       211\n",
      "-------------+----------------------------------   F(2, 208)       =      0.54\n",
      "       Model |  .158585729         2  .079292864   Prob > F        =    0.5860\n",
      "    Residual |  30.7853622       208  .148006549   R-squared       =    0.0051\n",
      "-------------+----------------------------------   Adj R-squared   =   -0.0044\n",
      "       Total |   30.943948       210  .147352133   Root MSE        =    .38472\n",
      "\n",
      "------------------------------------------------------------------------------\n",
      "  relative_v | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "  sequential |  -.0020622   .0550313    -0.04   0.970    -.1105528    .1064285\n",
      "      female |  -.0548724   .0530145    -1.04   0.302     -.159387    .0496421\n",
      "       _cons |     .69401   .0521441    13.31   0.000     .5912113    .7968088\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      "Linear regression                               Number of obs     =      4,220\n",
      "                                                F(1, 210)         =       0.05\n",
      "                                                Prob > F          =     0.8189\n",
      "                                                R-squared         =     0.0002\n",
      "                                                Root MSE          =     .40216\n",
      "\n",
      "                                   (Std. err. adjusted for 211 clusters in id)\n",
      "------------------------------------------------------------------------------\n",
      "             |               Robust\n",
      "  relative_v | Coefficient  std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "  sequential |   .0123068   .0536889     0.23   0.819    -.0935316    .1181452\n",
      "       _cons |   .6647923   .0460059    14.45   0.000     .5740997    .7554848\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      " ( 1)  sequential + _cons = 0\n",
      "\n",
      "------------------------------------------------------------------------------\n",
      "  relative_v | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "         (1) |    .677099    .027676    24.47   0.000     .6225407    .7316574\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      "Linear regression                               Number of obs     =      4,220\n",
      "                                                F(2, 210)         =       1.51\n",
      "                                                Prob > F          =     0.2227\n",
      "                                                R-squared         =     0.0110\n",
      "                                                Root MSE          =     .40004\n",
      "\n",
      "                                   (Std. err. adjusted for 211 clusters in id)\n",
      "------------------------------------------------------------------------------\n",
      "             |               Robust\n",
      "  relative_v | Coefficient  std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "  sequential |   .0102181    .053469     0.19   0.849    -.0951867     .115623\n",
      "      female |  -.0835313   .0485441    -1.72   0.087    -.1792274    .0121648\n",
      "       _cons |     .70927   .0545095    13.01   0.000     .6018141    .8167258\n",
      "------------------------------------------------------------------------------\n",
      "\n"
     ]
    }
   ],
   "source": [
    "preserve\n",
    "\n",
    "* Only standard lotteries; and only data from the main treatments\n",
    "keep if ~regret\n",
    "qui gen inreg =( cond<=4 & pilot!=1)\n",
    "qui gen female = ( gender==\"Female\" )\n",
    "\n",
    "* First-round only\n",
    "\n",
    "reg relative_v sequential if round==1 & inreg\n",
    "lincom _cons + _b[sequential]\n",
    "\n",
    "reg relative_v sequential female if round==1 & inreg\n",
    "\n",
    "* All rounds with clustering\n",
    "\n",
    "reg relative_v sequential if inreg, cluster(id)\n",
    "lincom _cons + _b[sequential]\n",
    "\n",
    "reg relative_v sequential female if inreg, cluster(id)\n",
    "\n",
    "restore"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 2.3 Sequentiality premium for regret lotteries"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "NOTE: does not include pilot data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "            |        Summary of relative_v\n",
      "       cond |        Mean   Std. dev.       Freq.\n",
      "------------+------------------------------------\n",
      "    reg-seq |   .67996738   .35843764         139\n",
      "    reg-sim |   .64065423    .3696063          79\n",
      "------------+------------------------------------\n",
      "      Total |   .66572087   .36216985         218\n"
     ]
    }
   ],
   "source": [
    "tab cond if ( cond==2 | cond==4 ) & round==1 & pilot!=1, sum(relative_v)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "(9,580 observations deleted)\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "      Source |       SS           df       MS      Number of obs   =       218\n",
      "-------------+----------------------------------   F(1, 216)       =      0.59\n",
      "       Model |   .07785042         1   .07785042   Prob > F        =    0.4423\n",
      "    Residual |  28.3853884       216  .131413835   R-squared       =    0.0027\n",
      "-------------+----------------------------------   Adj R-squared   =   -0.0019\n",
      "       Total |  28.4632388       217  .131166999   Root MSE        =    .36251\n",
      "\n",
      "------------------------------------------------------------------------------\n",
      "  relative_v | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "  sequential |   .0393131   .0510773     0.77   0.442    -.0613606    .1399869\n",
      "       _cons |   .6406542   .0407856    15.71   0.000     .5602655     .721043\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      " ( 1)  sequential + _cons = 0\n",
      "\n",
      "------------------------------------------------------------------------------\n",
      "  relative_v | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "         (1) |   .6799674   .0307477    22.11   0.000     .6193634    .7405714\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      "      Source |       SS           df       MS      Number of obs   =       218\n",
      "-------------+----------------------------------   F(2, 215)       =      3.31\n",
      "       Model |  .851284468         2  .425642234   Prob > F        =    0.0382\n",
      "    Residual |  27.6119543       215  .128427695   R-squared       =    0.0299\n",
      "-------------+----------------------------------   Adj R-squared   =    0.0209\n",
      "       Total |  28.4632388       217  .131166999   Root MSE        =    .35837\n",
      "\n",
      "------------------------------------------------------------------------------\n",
      "  relative_v | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "  sequential |    .039019   .0504938     0.77   0.441    -.0605072    .1385452\n",
      "      female |  -.1196327   .0487492    -2.45   0.015    -.2157203   -.0235451\n",
      "       _cons |   .6951704   .0460344    15.10   0.000     .6044339    .7859069\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      "Linear regression                               Number of obs     =      4,360\n",
      "                                                F(1, 217)         =       4.10\n",
      "                                                Prob > F          =     0.0441\n",
      "                                                R-squared         =     0.0148\n",
      "                                                Root MSE          =     .38405\n",
      "\n",
      "                                   (Std. err. adjusted for 218 clusters in id)\n",
      "------------------------------------------------------------------------------\n",
      "             |               Robust\n",
      "  relative_v | Coefficient  std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "  sequential |   .0979351   .0483682     2.02   0.044     .0026035    .1932667\n",
      "       _cons |   .6406542   .0414198    15.47   0.000     .5590177    .7222908\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      " ( 1)  sequential + _cons = 0\n",
      "\n",
      "------------------------------------------------------------------------------\n",
      "  relative_v | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "         (1) |   .7385893   .0249777    29.57   0.000     .6893595    .7878192\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      "Linear regression                               Number of obs     =      4,360\n",
      "                                                F(2, 217)         =       2.14\n",
      "                                                Prob > F          =     0.1197\n",
      "                                                R-squared         =     0.0156\n",
      "                                                Root MSE          =     .38394\n",
      "\n",
      "                                   (Std. err. adjusted for 218 clusters in id)\n",
      "------------------------------------------------------------------------------\n",
      "             |               Robust\n",
      "  relative_v | Coefficient  std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "  sequential |   .0978819   .0484175     2.02   0.044     .0024531    .1933108\n",
      "      female |  -.0216237   .0438717    -0.49   0.623    -.1080929    .0648456\n",
      "       _cons |    .650508   .0459033    14.17   0.000     .5600346    .7409815\n",
      "------------------------------------------------------------------------------\n",
      "\n"
     ]
    }
   ],
   "source": [
    "preserve\n",
    "\n",
    "* Keep only regret, NEW data, and original treatments\n",
    "keep if regret\n",
    "qui gen inreg = ( cond<=4 & pilot!=1 )\n",
    "qui gen female = ( gender == \"Female\" )\n",
    "\n",
    "* First-round only\n",
    "\n",
    "reg relative_v sequential if round==1 & inreg\n",
    "lincom _cons + _b[sequential]\n",
    "\n",
    "reg relative_v sequential female if round==1 & inreg\n",
    "\n",
    "* All rounds with clustering\n",
    "\n",
    "reg relative_v sequential if inreg, cluster(id)\n",
    "lincom _cons + _b[sequential]\n",
    "\n",
    "reg relative_v sequential female if inreg, cluster(id)\n",
    "\n",
    "restore"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 2.4 Regret premium in the sequential treatments (anticipated learning)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "            |        Summary of relative_v\n",
      "       cond |        Mean   Std. dev.       Freq.\n",
      "------------+------------------------------------\n",
      "    std-seq |   .66410218   .37252825         134\n",
      "    reg-seq |   .67996738   .35843764         139\n",
      "------------+------------------------------------\n",
      "      Total |   .67218006   .36483504         273\n"
     ]
    }
   ],
   "source": [
    "tab cond if ( cond==1 | cond==2 ) & round==1 & pilot!=1, sum(relative_v)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "(4,260 observations deleted)\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "       cond |      Freq.     Percent        Cum.\n",
      "------------+-----------------------------------\n",
      "    std-seq |        134       49.08       49.08\n",
      "    reg-seq |        139       50.92      100.00\n",
      "------------+-----------------------------------\n",
      "      Total |        273      100.00\n",
      "\n",
      "\n",
      "      Source |       SS           df       MS      Number of obs   =       273\n",
      "-------------+----------------------------------   F(1, 271)       =      0.13\n",
      "       Model |  .017173075         1  .017173075   Prob > F        =    0.7202\n",
      "    Residual |  36.1872806       271  .133532401   R-squared       =    0.0005\n",
      "-------------+----------------------------------   Adj R-squared   =   -0.0032\n",
      "       Total |  36.2044537       272  .133104609   Root MSE        =    .36542\n",
      "\n",
      "------------------------------------------------------------------------------\n",
      "  relative_v | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "      regret |   .0158652     .04424     0.36   0.720    -.0712325    .1029629\n",
      "       _cons |   .6641022   .0315676    21.04   0.000     .6019534     .726251\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      "      Source |       SS           df       MS      Number of obs   =       273\n",
      "-------------+----------------------------------   F(2, 270)       =      4.89\n",
      "       Model |  1.26476897         2  .632384486   Prob > F        =    0.0082\n",
      "    Residual |  34.9396847       270   .12940624   R-squared       =    0.0349\n",
      "-------------+----------------------------------   Adj R-squared   =    0.0278\n",
      "       Total |  36.2044537       272  .133104609   Root MSE        =    .35973\n",
      "\n",
      "------------------------------------------------------------------------------\n",
      "  relative_v | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "      regret |    .008517   .0436154     0.20   0.845    -.0773524    .0943864\n",
      "      female |  -.1355123   .0436435    -3.10   0.002    -.2214371   -.0495875\n",
      "       _cons |   .7328696   .0381605    19.20   0.000     .6577396    .8079997\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      "Linear regression                               Number of obs     =      5,460\n",
      "                                                F(1, 272)         =       2.72\n",
      "                                                Prob > F          =     0.1000\n",
      "                                                R-squared         =     0.0059\n",
      "                                                Root MSE          =     .39744\n",
      "\n",
      "                                   (Std. err. adjusted for 273 clusters in id)\n",
      "------------------------------------------------------------------------------\n",
      "             |               Robust\n",
      "  relative_v | Coefficient  std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "      regret |   .0614903   .0372608     1.65   0.100     -.011866    .1348466\n",
      "       _cons |    .677099   .0276603    24.48   0.000     .6226436    .7315545\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      "Linear regression                               Number of obs     =      5,460\n",
      "                                                F(2, 272)         =       3.96\n",
      "                                                Prob > F          =     0.0202\n",
      "                                                R-squared         =     0.0159\n",
      "                                                Root MSE          =     .39548\n",
      "\n",
      "                                   (Std. err. adjusted for 273 clusters in id)\n",
      "------------------------------------------------------------------------------\n",
      "             |               Robust\n",
      "  relative_v | Coefficient  std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "      regret |   .0571649   .0371274     1.54   0.125    -.0159287    .1302586\n",
      "      female |  -.0797665   .0369511    -2.16   0.032    -.1525131   -.0070199\n",
      "       _cons |   .7175776   .0348796    20.57   0.000     .6489092    .7862459\n",
      "------------------------------------------------------------------------------\n",
      "\n"
     ]
    }
   ],
   "source": [
    "preserve\n",
    "\n",
    "* Only sequential, NEW data, and original treatments\n",
    "keep if sequential\n",
    "qui gen inreg = ( cond<=4 & pilot!=1 )\n",
    "qui gen female = ( gender==\"Female\" )\n",
    "\n",
    "tab cond if inreg & round==1\n",
    "\n",
    "* First-round only (anticipated learning effect)\n",
    "\n",
    "reg relative_v regret if round==1 & inreg\n",
    "// local r_sqr = e(r2)\n",
    "// display `r_sqr'/(1-`r_sqr')\n",
    "\n",
    "reg relative_v regret female if round==1 & inreg\n",
    "// local r_sqr = e(r2)\n",
    "// display `r_sqr'/(1-`r_sqr')\n",
    "\n",
    "* All rounds with clusterind\n",
    "\n",
    "reg relative_v regret if inreg, cluster(id)\n",
    "reg relative_v regret female if inreg, cluster(id)\n",
    "\n",
    "restore"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## (3) Appendix Table D.5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "       cond |      Freq.     Percent        Cum.\n",
      "------------+-----------------------------------\n",
      "    reg-seq |      3,420       27.49       27.49\n",
      "    reg-sim |      2,140       17.20       44.69\n",
      "reg-seq-rnd |      2,740       22.03       66.72\n",
      " reg-seq-ch |      2,500       20.10       86.82\n",
      " reg-seq-mp |      1,640       13.18      100.00\n",
      "------------+-----------------------------------\n",
      "      Total |     12,440      100.00\n"
     ]
    }
   ],
   "source": [
    "tab cond if regret"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "(10,060 observations deleted)\n",
      "\n",
      "\n",
      "\n",
      "       cond |      Freq.     Percent        Cum.\n",
      "------------+-----------------------------------\n",
      "    std-seq |      3,300       27.59       27.59\n",
      "    reg-seq |      3,420       28.60       56.19\n",
      "reg-seq-rnd |      2,740       22.91       79.10\n",
      " reg-seq-ch |      2,500       20.90      100.00\n",
      "------------+-----------------------------------\n",
      "      Total |     11,960      100.00\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "      Source |       SS           df       MS      Number of obs   =       598\n",
      "-------------+----------------------------------   F(3, 594)       =      1.70\n",
      "       Model |  .605988338         3  .201996113   Prob > F        =    0.1649\n",
      "    Residual |  70.3922128       594  .118505409   R-squared       =    0.0085\n",
      "-------------+----------------------------------   Adj R-squared   =    0.0035\n",
      "       Total |  70.9982011       597   .11892496   Root MSE        =    .34425\n",
      "\n",
      "------------------------------------------------------------------------------\n",
      "  relative_v | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      " pure_regret |   .0018532   .0375663     0.05   0.961    -.0719257    .0756322\n",
      "      choice |  -.0772359   .0408198    -1.89   0.059    -.1574046    .0029329\n",
      "      random |  -.0417643   .0397897    -1.05   0.294    -.1199099    .0363812\n",
      "       _cons |    .652796   .0267995    24.36   0.000     .6001627    .7054294\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      " ( 1)  choice - random = 0\n",
      " ( 2)  - pure_regret + choice = 0\n",
      "\n",
      "       F(  2,   594) =    1.95\n",
      "            Prob > F =    0.1436\n",
      "\n",
      "\n",
      "      Source |       SS           df       MS      Number of obs   =       598\n",
      "-------------+----------------------------------   F(4, 593)       =      3.66\n",
      "       Model |  1.71030809         4  .427577022   Prob > F        =    0.0059\n",
      "    Residual |   69.287893       593   .11684299   R-squared       =    0.0241\n",
      "-------------+----------------------------------   Adj R-squared   =    0.0175\n",
      "       Total |  70.9982011       597   .11892496   Root MSE        =    .34182\n",
      "\n",
      "------------------------------------------------------------------------------\n",
      "  relative_v | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      " pure_regret |   .0013948   .0373022     0.04   0.970    -.0718657    .0746552\n",
      "      choice |  -.0831732   .0405785    -2.05   0.041    -.1628682   -.0034782\n",
      "      random |  -.0395135   .0395164    -1.00   0.318    -.1171226    .0380956\n",
      "      female |  -.0862374   .0280511    -3.07   0.002     -.141329   -.0311459\n",
      "       _cons |   .6946081    .029885    23.24   0.000     .6359148    .7533014\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      "Linear regression                               Number of obs     =     11,960\n",
      "                                                F(3, 597)         =       1.41\n",
      "                                                Prob > F          =     0.2387\n",
      "                                                R-squared         =     0.0042\n",
      "                                                Root MSE          =     .39003\n",
      "\n",
      "                                   (Std. err. adjusted for 598 clusters in id)\n",
      "------------------------------------------------------------------------------\n",
      "             |               Robust\n",
      "  relative_v | Coefficient  std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      " pure_regret |   .0538555   .0323526     1.66   0.097    -.0096832    .1173943\n",
      "      random |   .0059976   .0337517     0.18   0.859    -.0602888    .0722841\n",
      "      choice |  -.0092784   .0378441    -0.25   0.806    -.0836022    .0650454\n",
      "       _cons |    .688943   .0234031    29.44   0.000     .6429807    .7349054\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      " ( 1)  random - choice = 0\n",
      " ( 2)  - pure_regret + random = 0\n",
      "\n",
      "       F(  2,   597) =    1.79\n",
      "            Prob > F =    0.1685\n",
      "\n",
      "\n",
      "Linear regression                               Number of obs     =     11,960\n",
      "                                                F(4, 597)         =       2.85\n",
      "                                                Prob > F          =     0.0233\n",
      "                                                R-squared         =     0.0111\n",
      "                                                Root MSE          =     .38867\n",
      "\n",
      "                                   (Std. err. adjusted for 598 clusters in id)\n",
      "------------------------------------------------------------------------------\n",
      "             |               Robust\n",
      "  relative_v | Coefficient  std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      " pure_regret |   .0535074   .0321565     1.66   0.097    -.0096463     .116661\n",
      "      random |   .0077069   .0335062     0.23   0.818    -.0580974    .0735113\n",
      "      choice |  -.0137873   .0376188    -0.37   0.714    -.0876686     .060094\n",
      "      female |  -.0654895   .0244762    -2.68   0.008    -.1135595   -.0174196\n",
      "       _cons |   .7206955    .026428    27.27   0.000     .6687925    .7725986\n",
      "------------------------------------------------------------------------------\n",
      "\n"
     ]
    }
   ],
   "source": [
    "preserve\n",
    "\n",
    "* Keep only relevant treatments and create dummy\n",
    "keep if ( cond==1 | cond==2 | cond==6 | cond==7 )\n",
    "qui gen female = ( gender==\"Female\" )\n",
    "tab cond\n",
    "\n",
    "qui gen pure_regret = ( cond==2 )\n",
    "qui gen choice = ( cond==7 )\n",
    "qui gen random = ( cond==6 )\n",
    "\n",
    "* First-round only \n",
    "\n",
    "reg relative_v pure_regret choice random if round==1\n",
    "test _b[choice] == _b[random] = _b[pure_regret]\n",
    "\n",
    "reg relative_v pure_regret choice random female if round==1\n",
    "\n",
    "* All rounds with clustering\n",
    "\n",
    "reg relative_v pure_regret random choice, cluster(id)\n",
    "test _b[random] == _b[choice] == _b[pure_regret]\n",
    "\n",
    "reg relative_v pure_regret random choice female, cluster(id)\n",
    "\n",
    "restore"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## (4) Appendix Table D.6"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "       cond |      Freq.     Percent        Cum.\n",
      "------------+-----------------------------------\n",
      "    std-seq |      3,300       69.04       69.04\n",
      " std-seq-mp |      1,480       30.96      100.00\n",
      "------------+-----------------------------------\n",
      "      Total |      4,780      100.00\n"
     ]
    }
   ],
   "source": [
    "tab cond if ( cond==1 | cond==8 )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "            |        Summary of relative_v\n",
      "       cond |        Mean   Std. dev.       Freq.\n",
      "------------+------------------------------------\n",
      "    std-seq |   .66410218   .37252825         134\n",
      "  std-seq-m |   .64864866   .29008354          74\n",
      "------------+------------------------------------\n",
      "      Total |   .65860429   .34481391         208\n"
     ]
    }
   ],
   "source": [
    "tab cond if ( cond==1 | cond==8 ) & round==1 & pilot!=1, sum(relative_v)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "First: results for the standard-sequential treatment"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "(17,860 observations deleted)\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "      Source |       SS           df       MS      Number of obs   =       208\n",
      "-------------+----------------------------------   F(1, 206)       =      0.10\n",
      "       Model |  .011384867         1  .011384867   Prob > F        =    0.7578\n",
      "    Residual |  24.6002176       206  .119418532   R-squared       =    0.0005\n",
      "-------------+----------------------------------   Adj R-squared   =   -0.0044\n",
      "       Total |  24.6116025       207   .11889663   Root MSE        =    .34557\n",
      "\n",
      "------------------------------------------------------------------------------\n",
      "  relative_v | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "    modified |  -.0154535   .0500494    -0.31   0.758    -.1141283    .0832213\n",
      "       _cons |   .6641022   .0298527    22.25   0.000     .6052462    .7229581\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      " ( 1)  modified + _cons = 0\n",
      "\n",
      "------------------------------------------------------------------------------\n",
      "  relative_v | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "         (1) |   .6486487   .0401717    16.15   0.000     .5694483     .727849\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      "      Source |       SS           df       MS      Number of obs   =       208\n",
      "-------------+----------------------------------   F(2, 205)       =      0.16\n",
      "       Model |   .03872521         2  .019362605   Prob > F        =    0.8509\n",
      "    Residual |  24.5728772       205  .119867694   R-squared       =    0.0016\n",
      "-------------+----------------------------------   Adj R-squared   =   -0.0082\n",
      "       Total |  24.6116025       207   .11889663   Root MSE        =    .34622\n",
      "\n",
      "------------------------------------------------------------------------------\n",
      "  relative_v | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "    modified |  -.0168671   .0502308    -0.34   0.737    -.1159023     .082168\n",
      "      female |  -.0229793   .0481156    -0.48   0.633    -.1178441    .0718855\n",
      "       _cons |   .6757633   .0386098    17.50   0.000     .5996401    .7518865\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      "Linear regression                               Number of obs     =      4,160\n",
      "                                                F(1, 207)         =       0.04\n",
      "                                                Prob > F          =     0.8461\n",
      "                                                R-squared         =     0.0001\n",
      "                                                Root MSE          =     .39387\n",
      "\n",
      "                                   (Std. err. adjusted for 208 clusters in id)\n",
      "------------------------------------------------------------------------------\n",
      "             |               Robust\n",
      "  relative_v | Coefficient  std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "    modified |   .0085887   .0441982     0.19   0.846    -.0785477    .0957251\n",
      "       _cons |    .677099    .027677    24.46   0.000     .6225341     .731664\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      " ( 1)  modified + _cons = 0\n",
      "\n",
      "------------------------------------------------------------------------------\n",
      "  relative_v | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "         (1) |   .6856878   .0344597    19.90   0.000     .6177509    .7536246\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      "Linear regression                               Number of obs     =      4,160\n",
      "                                                F(2, 207)         =       1.41\n",
      "                                                Prob > F          =     0.2471\n",
      "                                                R-squared         =     0.0081\n",
      "                                                Root MSE          =     .39233\n",
      "\n",
      "                                   (Std. err. adjusted for 208 clusters in id)\n",
      "------------------------------------------------------------------------------\n",
      "             |               Robust\n",
      "  relative_v | Coefficient  std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "    modified |     .00424   .0444705     0.10   0.924    -.0834332    .0919132\n",
      "      female |   -.070691   .0432952    -1.63   0.104    -.1560471    .0146651\n",
      "       _cons |   .7129721   .0372289    19.15   0.000     .6395756    .7863686\n",
      "------------------------------------------------------------------------------\n",
      "\n"
     ]
    }
   ],
   "source": [
    "preserve\n",
    "\n",
    "* Only conditions 1 (std-seq) and 8 (std-seq-mp)\n",
    "keep if ( cond==1 | cond==8 ) & pilot!=1\n",
    "qui gen female = ( gender==\"Female\" )\n",
    "\n",
    "qui gen modified = ( cond == 8 )\n",
    "\n",
    "* First-round only\n",
    "reg relative_v modified if round==1 \n",
    "lincom _cons + _b[modified]\n",
    "\n",
    "reg relative_v modified female if round==1\n",
    "\n",
    "* All rounds with clustering\n",
    "\n",
    "reg relative_v modified, cluster(id)\n",
    "lincom _cons + _b[modified]\n",
    "\n",
    "reg relative_v modified female, cluster(id)\n",
    "\n",
    "restore"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Second: results for the regret-sequential treatment"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "       cond |      Freq.     Percent        Cum.\n",
      "------------+-----------------------------------\n",
      "    std-seq |      3,300       66.80       66.80\n",
      " reg-seq-mp |      1,640       33.20      100.00\n",
      "------------+-----------------------------------\n",
      "      Total |      4,940      100.00\n"
     ]
    }
   ],
   "source": [
    "tab cond if ( cond==1 | cond==9 )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "            |        Summary of relative_v\n",
      "       cond |        Mean   Std. dev.       Freq.\n",
      "------------+------------------------------------\n",
      "    std-seq |   .66410218   .37252825         134\n",
      "  reg-seq-m |   .61051044   .36097935          82\n",
      "------------+------------------------------------\n",
      "      Total |   .64375717   .36826606         216\n"
     ]
    }
   ],
   "source": [
    "tab cond if ( cond==1 | cond==9 ) & round==1 & pilot!=1, sum(relative_v)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "(17,700 observations deleted)\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "      Source |       SS           df       MS      Number of obs   =       216\n",
      "-------------+----------------------------------   F(1, 214)       =      1.08\n",
      "       Model |  .146103463         1  .146103463   Prob > F        =    0.3004\n",
      "    Residual |  29.0121736       214  .135570905   R-squared       =    0.0050\n",
      "-------------+----------------------------------   Adj R-squared   =    0.0004\n",
      "       Total |   29.158277       215  .135619893   Root MSE        =     .3682\n",
      "\n",
      "------------------------------------------------------------------------------\n",
      "  relative_v | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "    modified |  -.0535917   .0516239    -1.04   0.300    -.1553482    .0481647\n",
      "       _cons |   .6641022   .0318076    20.88   0.000     .6014059    .7267985\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      " ( 1)  modified + _cons = 0\n",
      "\n",
      "------------------------------------------------------------------------------\n",
      "  relative_v | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "         (1) |   .6105104   .0406608    15.01   0.000     .5303634    .6906575\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      "      Source |       SS           df       MS      Number of obs   =       216\n",
      "-------------+----------------------------------   F(2, 213)       =      0.84\n",
      "       Model |  .229367197         2  .114683599   Prob > F        =    0.4312\n",
      "    Residual |  28.9289098       213  .135816478   R-squared       =    0.0079\n",
      "-------------+----------------------------------   Adj R-squared   =   -0.0014\n",
      "       Total |   29.158277       215  .135619893   Root MSE        =    .36853\n",
      "\n",
      "------------------------------------------------------------------------------\n",
      "  relative_v | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "    modified |  -.0519662   .0517123    -1.00   0.316    -.1538997    .0499672\n",
      "      female |  -.0393412   .0502453    -0.78   0.435    -.1383829    .0597006\n",
      "       _cons |   .6840664   .0407883    16.77   0.000      .603666    .7644668\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      "Linear regression                               Number of obs     =      4,320\n",
      "                                                F(1, 215)         =       0.43\n",
      "                                                Prob > F          =     0.5150\n",
      "                                                R-squared         =     0.0013\n",
      "                                                Root MSE          =     .41154\n",
      "\n",
      "                                   (Std. err. adjusted for 216 clusters in id)\n",
      "------------------------------------------------------------------------------\n",
      "             |               Robust\n",
      "  relative_v | Coefficient  std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "    modified |   .0303689   .0465645     0.65   0.515    -.0614124    .1221502\n",
      "       _cons |    .677099   .0276744    24.47   0.000     .6225512    .7316469\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      " ( 1)  modified + _cons = 0\n",
      "\n",
      "------------------------------------------------------------------------------\n",
      "  relative_v | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "         (1) |   .7074679   .0374483    18.89   0.000     .6336551    .7812808\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      "Linear regression                               Number of obs     =      4,320\n",
      "                                                F(2, 215)         =       0.26\n",
      "                                                Prob > F          =     0.7724\n",
      "                                                R-squared         =     0.0015\n",
      "                                                Root MSE          =     .41154\n",
      "\n",
      "                                   (Std. err. adjusted for 216 clusters in id)\n",
      "------------------------------------------------------------------------------\n",
      "             |               Robust\n",
      "  relative_v | Coefficient  std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "    modified |   .0308923   .0466062     0.66   0.508    -.0609712    .1227559\n",
      "      female |  -.0126687   .0448391    -0.28   0.778    -.1010492    .0757118\n",
      "       _cons |   .6835279   .0377819    18.09   0.000     .6090575    .7579983\n",
      "------------------------------------------------------------------------------\n",
      "\n"
     ]
    }
   ],
   "source": [
    "preserve\n",
    "\n",
    "* Only conditions 1 (std-seq) and 9 (reg-seq-mp)\n",
    "keep if ( cond==1 | cond==9 ) & pilot != 1\n",
    "qui gen female = ( gender==\"Female\" )\n",
    "\n",
    "qui gen modified = ( cond == 9 )\n",
    "\n",
    "* First-round only\n",
    "reg relative_v modified if round==1 \n",
    "lincom _cons + _b[modified]\n",
    "\n",
    "reg relative_v modified female if round==1\n",
    "\n",
    "* All rounds with clustering\n",
    "\n",
    "reg relative_v modified, cluster(id)\n",
    "lincom _cons + _b[modified]\n",
    "\n",
    "reg relative_v modified female, cluster(id)\n",
    "\n",
    "restore"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Resuts on Standard-Sequential-Blind"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "       cond |      Freq.     Percent        Cum.\n",
      "------------+-----------------------------------\n",
      "    std-seq |      3,300       14.99       14.99\n",
      "    reg-seq |      3,420       15.53       30.52\n",
      "    std-sim |      2,120        9.63       40.15\n",
      "    reg-sim |      2,140        9.72       49.86\n",
      " std-seq-bl |      2,680       12.17       62.03\n",
      "reg-seq-rnd |      2,740       12.44       74.48\n",
      " reg-seq-ch |      2,500       11.35       85.83\n",
      " std-seq-mp |      1,480        6.72       92.55\n",
      " reg-seq-mp |      1,640        7.45      100.00\n",
      "------------+-----------------------------------\n",
      "      Total |     22,020      100.00\n"
     ]
    }
   ],
   "source": [
    "tab cond"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "       cond |      Freq.     Percent        Cum.\n",
      "------------+-----------------------------------\n",
      "    std-seq |      3,300       55.18       55.18\n",
      " std-seq-bl |      2,680       44.82      100.00\n",
      "------------+-----------------------------------\n",
      "      Total |      5,980      100.00\n"
     ]
    }
   ],
   "source": [
    "tab cond if ( cond==1 | cond==5 )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "            |        Summary of relative_v\n",
      "       cond |        Mean   Std. dev.       Freq.\n",
      "------------+------------------------------------\n",
      "    std-seq |   .66410218   .37252825         134\n",
      "  std-seq-b |   .60829872   .34533829         134\n",
      "------------+------------------------------------\n",
      "      Total |   .63620045   .35960551         268\n"
     ]
    }
   ],
   "source": [
    "tab cond if ( cond==1 | cond==5 ) & round==1 & pilot!=1, sum(relative_v)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "(16,660 observations deleted)\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "      Source |       SS           df       MS      Number of obs   =       268\n",
      "-------------+----------------------------------   F(1, 266)       =      1.62\n",
      "       Model |  .208639758         1  .208639758   Prob > F        =    0.2046\n",
      "    Residual |  34.3187649       266  .129017913   R-squared       =    0.0060\n",
      "-------------+----------------------------------   Adj R-squared   =    0.0023\n",
      "       Total |  34.5274047       267  .129316122   Root MSE        =    .35919\n",
      "\n",
      "------------------------------------------------------------------------------\n",
      "  relative_v | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "       blind |  -.0558035   .0438821    -1.27   0.205    -.1422039     .030597\n",
      "       _cons |   .6641022   .0310293    21.40   0.000     .6030078    .7251965\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      " ( 1)  blind + _cons = 0\n",
      "\n",
      "------------------------------------------------------------------------------\n",
      "  relative_v | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "         (1) |   .6082987   .0310293    19.60   0.000     .5472043    .6693931\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      "      Source |       SS           df       MS      Number of obs   =       268\n",
      "-------------+----------------------------------   F(2, 265)       =      0.81\n",
      "       Model |  .211026312         2  .105513156   Prob > F        =    0.4438\n",
      "    Residual |  34.3163784       265  .129495767   R-squared       =    0.0061\n",
      "-------------+----------------------------------   Adj R-squared   =   -0.0014\n",
      "       Total |  34.5274047       267  .129316122   Root MSE        =    .35986\n",
      "\n",
      "------------------------------------------------------------------------------\n",
      "  relative_v | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "       blind |  -.0557143   .0439682    -1.27   0.206    -.1422858    .0308572\n",
      "      female |  -.0059716   .0439878    -0.14   0.892    -.0925817    .0806385\n",
      "       _cons |   .6671325    .038271    17.43   0.000     .5917787    .7424864\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      "Linear regression                               Number of obs     =      5,360\n",
      "                                                F(1, 267)         =       0.73\n",
      "                                                Prob > F          =     0.3930\n",
      "                                                R-squared         =     0.0017\n",
      "                                                Root MSE          =     .39715\n",
      "\n",
      "                                   (Std. err. adjusted for 268 clusters in id)\n",
      "------------------------------------------------------------------------------\n",
      "             |               Robust\n",
      "  relative_v | Coefficient  std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "       blind |   .0326922   .0382095     0.86   0.393    -.0425381    .1079226\n",
      "       _cons |    .677099   .0276613    24.48   0.000      .622637    .7315611\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      " ( 1)  blind + _cons = 0\n",
      "\n",
      "------------------------------------------------------------------------------\n",
      "  relative_v | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "         (1) |   .7097913   .0263595    26.93   0.000     .6578924    .7616901\n",
      "------------------------------------------------------------------------------\n",
      "\n",
      "\n",
      "Linear regression                               Number of obs     =      5,360\n",
      "                                                F(2, 267)         =       1.17\n",
      "                                                Prob > F          =     0.3124\n",
      "                                                R-squared         =     0.0051\n",
      "                                                Root MSE          =     .39651\n",
      "\n",
      "                                   (Std. err. adjusted for 268 clusters in id)\n",
      "------------------------------------------------------------------------------\n",
      "             |               Robust\n",
      "  relative_v | Coefficient  std. err.      t    P>|t|     [95% conf. interval]\n",
      "-------------+----------------------------------------------------------------\n",
      "       blind |   .0333854   .0380797     0.88   0.381    -.0415892      .10836\n",
      "      female |  -.0464426   .0382163    -1.22   0.225    -.1216864    .0288011\n",
      "       _cons |    .700667   .0353158    19.84   0.000     .6311341    .7701998\n",
      "------------------------------------------------------------------------------\n",
      "\n"
     ]
    }
   ],
   "source": [
    "preserve\n",
    "\n",
    "* Only conditions 1 (std-seq) and 5 (std-seq-bl)\n",
    "keep if ( cond==1 | cond==5 ) & pilot != 1\n",
    "qui gen female = ( gender==\"Female\" )\n",
    "\n",
    "qui gen blind = ( cond == 5 )\n",
    "\n",
    "* First-round only\n",
    "reg relative_v blind if round==1 \n",
    "lincom _cons + _b[blind]\n",
    "\n",
    "reg relative_v blind female if round==1\n",
    "\n",
    "* All rounds with clustering\n",
    "\n",
    "reg relative_v blind, cluster(id)\n",
    "lincom _cons + _b[blind]\n",
    "\n",
    "reg relative_v blind female, cluster(id)\n",
    "\n",
    "restore"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# THE END"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Stata",
   "language": "stata",
   "name": "stata"
  },
  "language_info": {
   "codemirror_mode": "stata",
   "file_extension": ".do",
   "mimetype": "text/x-stata",
   "name": "stata",
   "version": "15.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
